{include file="public/header" /}
<style>
    .layui-form-select dl dd.layui-this {
        color: #FF2825 !important;
    }

    .layui-form-select dl dd {
        text-align: center;
    }

    .layui-form-select .layui-input {
        border: none;
        padding-left: 0 !important;
        text-align: left;
        width: 100%;
    }
</style>
<body>
<div class="header">
    <i class="layui-icon layui-icon-left"></i> 绑定{$title}
</div>
<form action="{:url('user/method_save',['type'=>$type])}" method="post" class="form layui-form">
    <ul class="upd-phone-list">
        {if $type != 'bank'}
            {if $type == 'usdt'}
            <li>
                <p>钱包地址</p>
                <input type="text" name="usdt_address" value="{$user.usdt_address?$user.usdt_address:''}" lay-verify="required"
                       lay-reqtext="请填写币安链钱包地址" lay-verType="tips" placeholder="请填写币安链钱包地址">
            </li>
            {elseif $type == 'lsc'}
            <li>
                <p>钱包地址</p>
                <input type="text" name="lsc_address" value="{$user.lsc_address?$user.lsc_address:''}" lay-verify="required"
                       lay-reqtext="请填写钱包地址" lay-verType="tips" placeholder="请填写钱包地址">
            </li>
            {else}
            <li>
                <p>真实姓名</p>
                <input type="text" name="name" value="<?php echo $user[$type . '_name']?>" placeholder="请填写真实姓名">
            </li>
            <li class="upd-label">
                <p>收款码</p>

                <p class="flex-center" style="width: 45%">
                    <img id="image_show" src="<?php echo $user[$type . '_image']??'/static/index/img/icon15.png';?>" alt="" >
                    <img src="/static/index/img/icon15.png" alt="" id="uploads_image">
                </p>
                <input type="hidden" name="image" id="images_value" value="<?php echo $user[$type . '_image'];?>"/>
            </li>
            {/if}
        {else}
        <li>
            <p>银行名称</p>
            <select name="bank_name" lay-verify="required" lay-reqtext="请选择银行" lay-verType="tips">
                <option value="">请选择</option>
                {foreach name="bank_list" item="vo" }
                <option value="{$vo}" {if $user.bank_name== $vo}selected{/if} >{$vo}</option>
                {/foreach}
            </select>
        </li>
        <li>
            <p>开户行</p>
            <input type="text" name="bank_open" value="{$user.bank_open?$user.bank_open:''}" lay-verify="required"
                   lay-reqtext="请填写开户行" lay-verType="tips" placeholder="请填写开户行">
        </li>
        <li>
            <p>持卡人</p>
            <input type="text" name="bank_account_name" value="{$user.bank_account_name?$user.bank_account_name:''}" lay-verify="required"
                   lay-reqtext="请填写银行户名" lay-verType="tips" placeholder="请填写银行户名">
        </li>
        <li>
            <p>银行卡号</p>
            <input type="text" name="bank_number"  value="{$user.bank_number?$user.bank_number:''}" lay-verify="required"
                   lay-reqtext="请填写银行账号" lay-verType="tips" placeholder="请填写银行账号">
        </li>
        {/if}
    </ul>

    <p class="save save-fixed upd-save" lay-submit lay-filter="save" formObj=".form">保存</p>
</form>
</body>
{include file="public/footer"/}
</html>